package com.photolibrary.base.load;


import com.photolibrary.R;

/**
 * 作者： ch
 * 时间： 2018/4/10 0010-上午 10:12
 * 描述：
 * 来源：
 */


public class PSConfig {
    public static final String IMG_CONTENT = "IMG_CONTENT";
    public static final String IMG_POSITION = "IMG_POSITION";
    private boolean mNeedCamera;
    private boolean mNeedGif;
    private boolean mNeedPaging = true;
    private boolean needGif;
    private boolean useSysAlbum = false;
    private int mMaxCount = 1;
    private int spanCount = 3;
    private boolean needCrop;

    public boolean isNeedCrop() {
        return needCrop;
    }


    private int mediaCheckedRes;
    private int mediaUnCheckedRes;
    private int cameraRes;

    private int titleColor = R.color.c000000;
    private String title = "请选择图片";

    private int titleBgColor = R.color.cffffff;

    public int getmMaxCount() {
        return mMaxCount;
    }

    public boolean isUseSysAlbum() {
        return useSysAlbum;
    }

    public int getSpanCount() {
        return spanCount;
    }

    public int getMediaCheckedRes() {
        return mediaCheckedRes;
    }

    public PSConfig setNeedCrop(boolean needCrop) {
        this.needCrop = needCrop;
        return this;
    }

    public PSConfig setUseSysAlbum(boolean useSysAlbum) {
        this.useSysAlbum = useSysAlbum;
        return this;
    }

    public PSConfig setMediaCheckedRes(int mediaCheckedRes) {
        this.mediaCheckedRes = mediaCheckedRes;
        return this;
    }

    public int getMediaUnCheckedRes() {
        return mediaUnCheckedRes;
    }

    public PSConfig setMediaUnCheckedRes(int mediaUnCheckedRes) {
        this.mediaUnCheckedRes = mediaUnCheckedRes;
        return this;
    }

    public int getCameraRes() {
        return cameraRes;
    }

    public PSConfig setCameraRes(int cameraRes) {
        this.cameraRes = cameraRes;
        return this;
    }

    public int getTitleColor() {
        return titleColor;

    }

    public PSConfig setTitleColor(int titleColor) {
        this.titleColor = titleColor;
        return this;
    }

    public String getTitle() {
        return title;
    }

    public PSConfig setTitle(String title) {
        this.title = title;
        return this;
    }

    public int getTitleBgColor() {
        return titleBgColor;
    }

    public PSConfig setTitleBgColor(int titleBgColor) {
        this.titleBgColor = titleBgColor;
        return this;
    }


    public boolean isNeedCamera() {
        return mNeedCamera;
    }

    public boolean isNeedPaging() {
        return mNeedPaging;
    }

    public boolean isNeedGif() {
        return needGif;
    }


    public PSConfig withMaxCount(int count) {
        if (count < 1) {
            return this;
        }
        this.mMaxCount = count;
        return this;
    }

    public PSConfig withSpanCount(int count) {
        if (count < 2) {
            return this;
        }
        this.spanCount = count;
        return this;
    }
}
